All Projects

|

MERN Unicorn Blog

🗓️ 2023

  • M
  • E
  • R
  • N
  • -
  • U
  • n
  • i
  • c
  • o
  • r
  • n
  • -
  • B
  • l
  • o
  • g

A full-stack blogging web application built using React.js, Node.js, Express.js, MongoDB, and Cloudinary. The platform allows users to create, read, update, and delete blog posts with rich content and media support. Ideal for writers, bloggers, and content creators.

Tech Stack:

React.js

Node.js

Express.js

Axios

Email.js

JWT

Cloudinary

MongoDB

Mongoose

Bootstrap

React Icons

Vercel

Render

MERN Unicorn Blog

Features and Functionality

User Authentication

Secure login and registration using JWT. Passwords are hashed and user sessions are authenticated via token-based flow.

Create & Manage Blog Posts

Users can create, edit, and delete blog posts. Posts include a title, content, tags, and optional image upload via Cloudinary.

Rich Text Editor

Content creation interface supports formatting, lists, code blocks, and media embedding for a rich writing experience.

Responsive UI

Designed using Bootstrap for a clean, responsive layout that works across all screen sizes and devices.

Image Upload with Cloudinary

Integrated Cloudinary for image storage and transformation, enabling fast, CDN-delivered image rendering in posts.

Public Blog Feed

Visitors can browse public blog posts, search by keyword or tag, and read full blog entries without needing an account.

User Dashboard

Authenticated users get access to a dashboard where they can manage their own blogs, view post stats, and update profile details.

Comments Section (optional/future scope)

Architecture supports a comments feature for reader engagement, to be implemented with moderation controls.

Email Notifications

Email.js is used to send welcome emails to new users and confirmation emails when blogs are published or updated.

Backend API with Express.js

RESTful API built with Express.js and secured with JWT for all CRUD operations on users and blog posts.

Deployment & Hosting

Frontend deployed on Vercel, backend hosted on Render. Environment variables are managed securely for API keys and DB connections.

Challenges and Solutions

Image Upload and Optimization

Integrated Cloudinary for optimized image uploads, auto-scaling, format conversion, and on-the-fly transformations.

Securing User Data and Sessions

Used JWT for stateless authentication, along with bcrypt for password hashing and token expiration strategies.

Rich Text Handling and Sanitization

Used a WYSIWYG editor with HTML sanitization libraries to prevent XSS attacks and unsafe script injections.

Consistent Styling Across Devices

Used Bootstrap’s responsive grid and utility classes to ensure layout consistency on desktop, tablet, and mobile.

Handling Large Images or Upload Failures

Set image size limits on the client, used Cloudinary’s upload presets, and provided fallback messages for failed uploads.

API Rate Limits and Performance Bottlenecks

Optimized MongoDB queries with indexing, added pagination to post listings, and implemented basic request throttling.

Email Deliverability and Reliability

Configured Email.js with fallback error handling and added user feedback messages for email success or failure events.

Work - MERN Unicorn Blog